<?php


namespace app\index\model;
use think\Model;
use app\index\model\Cate as CateModel;
class Article extends Model
{
    public function getArticles($id){
        $catesres=new CateModel();
        $cateID=$catesres->getAllChildren($id);//栏目ID
        $Articles=db('article')->where('cateid','IN',$cateID)->order('id desc')->paginate(10);
        return $Articles;
    }

}